<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		
		<input type="text" name="id" id="id" value="" />
		
		<script src="../jquery-1.8.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script>
			$('#id').keydown(function(e){ //id是输入框的id
				if(e.keyCode==13){//回车 
				  //要处理的事件
				  alert('哈哈');
				}; 
			});
		</script>
	</body>
</html>
